/** 病害相关的数据库初始化 */
import {
	TAB_LASTFILLINGRECORD
} from "../config";

/** 初始化上次填报记录表 */
export const createLastFillingRecordTable = db => {
	const sql = `
		create table if not exists '${TAB_LASTFILLINGRECORD}'(
			 _id  varchar(255),
			 id   int primary key,
			 inspectDate   int,
			 inspectEndDate   int,
			 inspectState   varchar(255),
			 inspectUser   varchar(255),
			 lineId   int,
			 lineSiteSectionId   int,
			 lineSiteSectionType   varchar(255),
			 recordCreateDate   varchar(255),
			 recordUpdateDate   varchar(255),
			 shiftOwnership   varchar(255),
			 pmId int,
			 pmName varchar(255)
		);
	`;
	return db.execute(sql);
}
